package com.esri.core.renderer;

import com.esri.core.internal.util.d;
import com.esri.core.map.SlopeType;
import java.io.StringWriter;
import org.codehaus.jackson.JsonGenerator;

/* loaded from: classes.dex */
public class HillshadeRenderer implements RasterRenderer {
    private static final long a = -1034759416674605085L;
    private static final String b = "hillshade";
    protected double mAltitude = 45.0d;
    protected double mAzimuth = 315.0d;
    protected double mZFactor = 1.0d;
    protected SlopeType mSlopeType = SlopeType.NONE;
    protected double mPixelSizeFactor = 1.0d;
    protected double mPixelSizePower = 1.0d;

    @Override // com.esri.core.renderer.RasterRenderer
    public String toJson() throws Exception {
        StringWriter stringWriter = new StringWriter();
        JsonGenerator a2 = d.a(stringWriter);
        a2.writeStartObject();
        toJson(a2);
        a2.writeEndObject();
        a2.close();
        return stringWriter.toString();
    }

    protected void toJson(JsonGenerator jsonGenerator) throws Exception {
        d.a(jsonGenerator, "type", b);
        SlopeType slopeType = this.mSlopeType;
        if (slopeType != null) {
            slopeType.toJson(jsonGenerator);
        }
        if (!Double.isNaN(this.mAltitude)) {
            d.a(jsonGenerator, "altitude", this.mAltitude);
        }
        if (!Double.isNaN(this.mAzimuth)) {
            d.a(jsonGenerator, "azimuth", this.mAzimuth);
        }
        if (!Double.isNaN(this.mZFactor)) {
            d.a(jsonGenerator, "zfactor", this.mZFactor);
        }
        if (!Double.isNaN(this.mPixelSizeFactor)) {
            d.a(jsonGenerator, "pixelSizeFactor", this.mPixelSizeFactor);
        }
        if (Double.isNaN(this.mPixelSizePower)) {
            return;
        }
        d.a(jsonGenerator, "pixelSizePower", this.mPixelSizePower);
    }

    public double getAltitude() {
        return this.mAltitude;
    }

    public void setAltitude(double d) {
        this.mAltitude = d;
    }

    public double getAzimuth() {
        return this.mAzimuth;
    }

    public void setAzimuth(double d) {
        this.mAzimuth = d;
    }

    public double getZfactor() {
        return this.mZFactor;
    }

    public void setZfactor(double d) {
        this.mZFactor = d;
    }

    public SlopeType getSlopeType() {
        return this.mSlopeType;
    }

    public void setSlopeType(SlopeType slopeType) {
        this.mSlopeType = slopeType;
    }

    public double getPixelSizeFactor() {
        return this.mPixelSizeFactor;
    }

    public void setPixelSizeFactor(double d) {
        this.mPixelSizeFactor = d;
    }

    public double getPixelSizePower() {
        return this.mPixelSizePower;
    }

    public void setPixelSizePower(double d) {
        this.mPixelSizePower = d;
    }
}
